package utils;

import java.math.BigInteger;

public class PI
{
	protected int k;
	public PI(int k)
	{
		this.k=k;
	}

	public static void main(String[] args) throws Exception
	{
		PI pi = new PI(1000000);
		pi.process();
	}

	private void process()
	{
		BigInteger res = new BigInteger("0");
		BigInteger one = new BigInteger("-1");
		BigInteger two = new BigInteger("2");
		for(int i =1; i<k;i++){
			BigInteger ii = new BigInteger(i+"");
			res = res.add(one.pow(i).divide(two.multiply(ii)).add(one));
		}
		res = res.multiply(new BigInteger("4"));
		
		System.out.println(res);
		
	}
	
	
}
